﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderStatistics.aspx.cs"
    Inherits="NJL.WebManage.Orders.OrderStatistics" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="/Scripts/js/jquery.skygqbox.1.3.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/Scripts/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        function tickvalue(id) {
            var iframesrc = document.getElementById("tick").src = "OrderDetails.aspx?id=" + id;
        }
        var orderCount = function (id) {
            $.ajax({
                type: 'get',
                url: '/Handle/Handler.ashx',
                data: 'CompanyId=' + id + '&startTime=' + $('#<%=txtStartTime.ClientID %>').val() + '&endTime=' + $('#<%=txtEndTime.ClientID %>').val()+'&rand='+Math.random(),
                dataType: 'text',
                success: function (msg) {
                    document.getElementById("content").innerHTML = msg;
                },
                error: function () {
                    alert("找不到资源");
                }
            })
        }
    </script>
    <style type="text/css">
        .onshow
        {
            background: #d6e6f5;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="info"></div>
    <div class="main_content fr">
        <div class="gray_bd">
            <div class="table_title">
                商户订单统计</div>
            <div id="dispArea" runat="server">
                &nbsp;&nbsp;地区：
                <asp:DropDownList ID="ddlarea" runat="server">
                </asp:DropDownList>
            </div>
            <div>
                <table>
                    <tr>
                        <td>
                            游玩时间：
                        </td>
                        <td>
                            <asp:TextBox ID="txtStartTime" runat="server" Width="100px" onclick="WdatePicker()"></asp:TextBox>至<asp:TextBox
                                ID="txtEndTime" runat="server" Width="100px" onclick="WdatePicker()"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="margin-left: 5px">
            </div>
            <div class="pad5px">
                <div class="border_b_dotted">
                    <table class="tableliststyle" cellspacing="0" rules="all" border="1">
                        <tr class="gridheader">
                            <th style="width: 40px;">
                                序号
                            </th>
                            <th>
                                商铺名称
                            </th>
                            <th>
                                订单数量
                            </th>
                            <th>
                                订票数量
                            </th>
                            <th>
                                总金额
                            </th>
                        </tr>
                        <asp:Repeater ID="rptUserList" runat="server" OnItemDataBound="rptUserList_ItemDataBound">
                            <ItemTemplate>
                                <tr onmouseover="this.className='onshow'" onmouseout="this.className=''" class="">
                                    <td align="center">
                                        <asp:Literal ID="litNum" runat="server"></asp:Literal>
                                    </td>
                                    <td align="left">
                                        <a href="javascript:$('#content').skygqbox();orderCount('<%#Eval("ID") %>')">
                                            <%#Eval("COMPANY_NAME")%></a>
                                    </td>
                                    <td align="right">
                                        <%#Eval("订单数量")%>
                                    </td>
                                    <td align="right">
                                        <%#Eval("订票数量")%>
                                    </td>
                                    <td align="right">
                                        <%#string.Format("{0:c}",Eval("总金额"))%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        <tr>
                            <td colspan="2" align="left">
                                合计:
                            </td>
                            <td align="right">
                                <asp:Literal ID="ltlAllOrderNum" runat="server"></asp:Literal>
                            </td>
                            <td align="right">
                            <asp:Literal ID="ltlTicketNum" runat="server"></asp:Literal>
                            </td>
                            <td align="right">
                            <asp:Literal ID="ltlMoney" runat="server"></asp:Literal>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="border_b_dotted" style="width: 500px; height: 200px; overflow-y: auto;
                    overflow-x: hidden; display:none" id="content">
                </div>
                <div style="text-align: center">
                    共
                    <asp:Literal ID="lit" runat="server"></asp:Literal>
                    条记录&nbsp;&nbsp;&nbsp;&nbsp; 共
                    <asp:Literal ID="litAllPage" runat="server"></asp:Literal>
                    页&nbsp;&nbsp;&nbsp;&nbsp; 第
                    <asp:Literal ID="litCurrentPage" runat="server"></asp:Literal>
                    页
                    <asp:LinkButton ID="lbtnFirst" runat="server" OnClick="lbtnFirst_Click">首页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnPrev" runat="server" OnClick="lbtnPrev_Click">上一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnNext" runat="server" OnClick="lbtnNext_Click">下一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnEnd" runat="server" OnClick="lbtnEnd_Click">末页</asp:LinkButton>
                    跳转到第
                    <asp:TextBox ID="txtPage" runat="server" Width="32px" MaxLength="8" Style="text-align: center"></asp:TextBox>&nbsp;页&nbsp;
                    <asp:Button ID="btnRir" runat="server" Text="确定" OnClick="btnRir_Click" />
                </div>
            </div>
        </div>
        <asp:HiddenField ID="HSelectId" runat="server" />
    </div>
    <div id="win" style="padding: 10px; display: none; width: 740px">
        <iframe id="tick" width="720" height="420" scrolling="auto"></iframe>
    </div>
    </form>
</body>
</html>
